Nested Mixin-Methods in Agora
نویسندگان
چکیده
Mixin-based inheritance is an inheritance technique that has been shown to subsume a variety of different inheritance mechanisms. It is based directly upon an incremental modification model of inheritance. This paper addresses the question of how mixins can be seen as named attributes of classes the same way that objects, methods, and also classes in their own right, are seen as named attributes of classes. The general idea is to let a class itself have control over how it is extended. This results in a powerful abstraction mechanism to control the construction of inheritance hierarchies in two ways. Firstly, by being able to constrain the inheritance hierarchy; secondly, by being able to extend a class in a way that is specific for that class. Nested mixins are a direct consequence of having mixins as attributes. The scope rules for nested mixins are discussed, and shown to preserve the encapsulation of objects.
منابع مشابه
A Core Calculus for Scala Type Checking
We present a minimal core calculus that captures interesting constructs of the Scala programming language: nested classes, abstract types, mixin composition, and path dependent types. We show that the problems of type assignment and subtyping in this calculus are decidable.
متن کاملNested Types
We currently see a convergence of module systems and type systems for object-oriented programming. This convergence is driven by the demands of large scale component systems. Objectoriented languages for medium-scale systems such as Eiffel or Sather still worked with an unstructured set of classes, but as systems grow this becomes less practical. Consequently, more recent languages such as Beta...
متن کاملModular Inheritance of Objects Through Mixin-Methods
In object-oriented programming languages the class concept is heavily overworked. To simplify things, there is a tendency to unbundle the different roles they play by trying to create more modular inheritance operators [Bracha&Lindstrom92]. This offers the advantage that classes can be composed in a modular way. Prototype-based languages on the other hand, also provide a simpler view on object-...
متن کاملImplementing Layered Designs with Mixin Layers1
Mixin layers are a technique for implementing layered object-oriented designs (e.g., collaboration-based designs). Mixin layers are similar to abstract subclasses (mixin classes) but scaled to a multiple-class granularity. We describe mixin layers from a programming language viewpoint, discuss checking the consistency of a mixin layer composition, and analyze the language support issues involved.
متن کاملAgora A Minimal Distributed Protocol for Electronic Commerce
Agora is a Web protocol for electronic commerce which is intended to support high volume of trans actions each with low incurred cost Agora has the following novel properties Minimal The incurred cost of Agora transac tions is close to free Web browsing where cost is determined by the number of messages Distributed Agora is fully distributed Mer chants can authenticate customers without ac cess...
متن کامل